<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
		<title>角色管理</title>
		<script type="text/javascript" src="../../commonFragment/header.js"></script>
		<script type="text/javascript" src="../../commonFragment/nojs.header.js"></script>
		
		<script>
			function operate(value, row, index, field) {
				let html =
					'<a " href="#!" data-id="' + row.id +
					'" class="btn btn-xs btn-default del-btn in-table" title="删除" data-toggle="tooltip" data-confirm="确认删除本地记录吗?"><i class="mdi mdi-window-close"></i></a>';
				return html;
			}
			
			function operate2(value, row, index, field) {
				let html =
					'<button type="button" class="btn btn-xs btn-default pop" data-url="' + base_url + 
					'/activiti/origin/viewImage?deploymentId='
						+ row.deploymentId +'&fileName=' + row.diagramResourceName
					+'">查看流程图</button>'
				return html;
			}
		</script>
	</head>
	<body>
		<div class="container-fluid p-t-15">
			<div class="row">
				<div class="col-lg-12">
					<div class="card">
						<div class="card-body">
							<form id="toolbar" class="form-inline">
								<!-- 操作按钮 -->
								<div class="form-group btn-group btn-group-sm">
									<button type="button" class="btn btn-sm btn-success add-multitab" data-id="add-role-form" data-url="module/activiti/deployment.html"
									 data-title="部署流程">
										<i class="glyphicon glyphicon-plus"></i> 添加
									</button>
								</div>
								<!-- 查询条件 -->
								<div class="form-group">
									<label class="sr-only" for="name">表单名称</label>
									<input type="text" class="form-control input-sm" id="name" name="name" placeholder="请输入表单名称" autocomplete="off">
								</div>

								<div class="form-group">
									<label class="sr-only" for="engine">是否启用</label>
									<select class="form-control input-sm" id="enable" name="enable" data-value="">
										<option value="">--请选择禁用启用--</option>
										<option value="0">禁用</option>
										<option value="1">启用</option>
									</select>
								</div>

								<div class="form-group ">
									<button type="button" class="btn btn-primary btn-sm query">
										<i class="glyphicon glyphicon-search"></i> 查询
									</button>
									<button type="button" class="btn btn-info btn-sm reset">
										<i class="glyphicon glyphicon-refresh"></i> 重置
									</button>
								</div>

							</form>
							<table id="table" class="table table-bordered table-hover table-striped bootstrapTable" data-list-url="/activiti/origin/deployments"
							 data-del-url="/activiti/origin/delete" data-toolbar="#toolbar">
								<thead>
									<tr>
										<th data-checkbox="true"></th>
										<th data-field="name">表单名称</th>
										<th data-field="id">id</th>
										<th data-field="deploymentTime">部署时间</th>
										<th data-field="operate" data-formatter="operate" data-events="defaultOperateEvent">操作</th>
									</tr>
								</thead>
							</table>
						</div>
					</div>
				</div>
			</div>

			<div class="row">
				<div class="col-lg-12">
					<div class="card">
						<div class="card-body">
							<form id="toolbar2" class="form-inline">
								<div class="form-group ">
									<button type="button" class="btn btn-primary btn-sm query">
										<i class="glyphicon glyphicon-search"></i> 查询
									</button>
									<button type="button" class="btn btn-info btn-sm reset">
										<i class="glyphicon glyphicon-refresh"></i> 重置
									</button>
								</div>
							</form>
							<table id="table2" class="table table-bordered table-hover table-striped bootstrapTable" data-list-url="/activiti/origin/processes"
							 data-del-url="/activiti/origin/delete" data-toolbar="#toolbar2">
								<thead>
									<tr>
										<th data-checkbox="true"></th>
										<th data-field="id">id</th>
										<th data-field="name">名称</th>
										<th data-field="key">key</th>
										<th data-field="version">版本</th>
										<th data-field="resourceName">resourceName</th>
										<th data-field="diagramResourceName">diagramResourceName</th>
										<th data-field="deploymentId">deploymentId</th>
										<th data-field="operate" data-formatter="operate2" data-events="defaultOperateEvent">操作</th>
									</tr>
								</thead>
							</table>
						</div>
					</div>
				</div>
			</div>

		</div>
	</body>

</html>
